🎖️GitЯра🎖️
Commit 9bf188c9f4e03fa64cf88dd3d1937d2c2b05f3c0
Parents : ffb0753
Author : James Rich <2199651+jamesarich@users.noreply.github.com>
Signature : Signature validation error
Date : 2026-06-03T11:44:27-05:00
Committer : GitHub <noreply@github.com>
Date : 2026-06-03T16:44:27Z
fix(map): keep compass icon visible while following bearing (#5728)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Changes
1 files changed, 4 insertions(+), 1 deletions(-)
Diff
diff --git a/feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/MapControlsOverlay.kt b/feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/MapControlsOverlay.kt
index 1445424b3f..454bc72b22 100644
--- a/feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/MapControlsOverlay.kt
+++ b/feature/map/src/commonMain/kotlin/org/meshtastic/feature/map/component/MapControlsOverlay.kt
@@ -42,6 +42,7 @@ import org.meshtastic.core.ui.icon.MeshtasticIcons
import org.meshtastic.core.ui.icon.MyLocation
import org.meshtastic.core.ui.icon.Refresh
import org.meshtastic.core.ui.icon.Tune
+import org.meshtastic.core.ui.theme.StatusColors.StatusBlue
import org.meshtastic.core.ui.theme.StatusColors.StatusRed
/**
@@ -127,9 +128,11 @@ fun MapControlsOverlay(
@Composable
private fun CompassButton(onClick: () -> Unit, bearing: Float, isFollowing: Boolean) {
+ // Tint, not `primary` — tinting the icon `primary` painted it the same color as its own primary-colored
+ // button background, making the compass disappear while following.
val iconTint =
when {
- isFollowing -> MaterialTheme.colorScheme.primary
+ isFollowing -> MaterialTheme.colorScheme.StatusBlue
bearing == 0f -> MaterialTheme.colorScheme.StatusRed
else -> null
}
Served by rngit 1.5.0 - Generated in 0.21s